package bb.lanxing.lib.devices.core.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class SyncSharedPreference {
    private static final String KEY_SYNC_SERVICE_FOREGROUND = "key_sync_service_foreground";
    private static final String PREFS_NAME = "sync_shared_preference";

    public static void saveSyncMode(Context context, boolean z) {
        SharedPreferences.Editor edit = context.getSharedPreferences(PREFS_NAME, 0).edit();
        edit.putBoolean("key_sync_service_foreground", z);
        edit.commit();
    }

    public static boolean getSyncMode(Context context) {
        return context.getSharedPreferences(PREFS_NAME, 0).getBoolean("key_sync_service_foreground", true);
    }
}
